<!DOCTYPE html>
<html>
<head>
<include file="Include:meta" />
<title>周报周期-目的地运营集团数据管理平台</title>
<include file="Include:style" />
<link rel="stylesheet" href="__PUBLIC__/mobile/css/dropload.css">
</head>
<body>
<div class="header">
	<a class="close_btn" href="__APP__/Mobile/Project/project_operate_list/id/{$project['id']}"></a>周报周期
</div>
<div class="content all">
    <div class="operate_cycle">
        <form method="post" name="number_validate" id="password_validate" novalidate="novalidate">
			<input type="hidden" name="action" value="one">
			<input type="hidden" name="pid" value="{$project['id']}">
            <ul>
				<foreach name="week_list" item="vo">
					<li>{$vo['detail']}<input type="hidden" name="week" mtype="{$vo['holiday']}" <if condition="$vo['holiday'] neq NULL">value="{$vo['holiday']}"<else />value="{$vo['num']}"</if>></li>
				</foreach>
            </ul>
            <button class="sub sub_btn disabled animate" type="button" disabled>确 定</button>
        </form>
    </div>
</div>
<include file="Include:javascript" />
<script src="__PUBLIC__/mobile/js/dropload.min.js"></script>
<script>
    $(function(){
        var winh = $(window).height();
        $('.operate_cycle').css('min-height',winh-44);
        $('.operate_cycle li').click(function(){
            $(this).toggleClass('active').siblings().removeClass('active');
            if($('.operate_cycle li.active').length>0){
                $(".sub_btn").removeClass("disabled").attr('disabled',false);
            }else{
                $(".sub_btn").addClass("disabled").attr('disabled',true);
            }
        })
        $('.sub_btn').click(function(){
            var val = $('.operate_cycle .active').find('input').val(),
                mtype = $('.operate_cycle .active').find('input').attr("mtype");
            $.ajax({
                type: 'POST',
                async:false,
				dataType:"json",
                data:$("[name='number_validate']").serialize()+"&val="+val+"&mtype="+mtype,
                url:"__APP__/Mobile/Project/project_operate_audit",
                dataType: 'json',
                success: function(data){
                    location.href="__APP__/Mobile/Project/project_operate_add_hb/week/"+data.week+"/pid/"+data.pid+"";
                }
            })
        })
    })
</script>
</body>
</html>